<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@taglib uri="/struts-tags" prefix="s"%>
<!DOCTYPE html>
<html>
   <head>
    	<title></title>   
		<s:include value="../../common/source.jsp"></s:include>
		<script src="js/member.js"></script>
			
  </head>
  <body>
   <div class="body">
          <div class="content ui-sortable">
          <div class="list">
         学生列表
           </div>
            </div>
 	 <br/>   
 	 <form action="teacher/searchStu.action" method="post">
             <div style="float:right">
              <label class="control-label v-top">学生姓名关键字：</label>
             <input type="text"  class="sear" name="stuName" > 
              <button type="submit" class="sui-btn btn-primary">搜索</button>
               </div>
            </form>
           <br>	
         <hr style="background-color:#cfe1f9;height:1px;"/>              
    <table class="sui-table table-primary table-sideheader ta-width">
          <thead>
            <tr>
              <th style="width:4%">序号</th>
              <th>学生姓名</th>
              <th>学号</th>            
              <th>学位</th>
              <th>毕业时间</th>
              <th>操作</th>       
            </tr>
          </thead>
          <tbody>
          <s:iterator value="stus"> 
            <tr>
              <td style="text-align:center"></td>
              <td><s:property value="name"/></td>
              <td><s:property value="number"/></td>
              <td>
              <s:if test="degree==0">硕士</s:if>
              <s:else>博士</s:else>
              </td>
              <td><s:date name="leaveDate"  format="yyyy-MM-dd" /></td>
              <td><a href="teacher/oneStu.action?stuId=<s:property value="stuId"/>">详情</a>
               <form action="teacher/deleteStu.action?stuId=<s:property value="stuId"/>" onsubmit="return firm()" method="post">
           <button type="submit">删除</button>
           </form>
              </td>
              </tr>
          </s:iterator>
          </tbody>
        </table>
        <div align="center" style="font-size: 12px">
							<s:if test="#request.page.hasPrePage">
							  
							    <a href="teacher/listStu.action?currentPage=1&&date1=${date111 }&&date2=${date222 }">首页</a> | 
								<a href="teacher/listStu.action?currentPage=${page.currentPage -1 }&&date1=${date111 }&&date2=${date222 }">上一页</a>
							    
							</s:if>
							<s:else>
							
							</s:else>
							<s:if test="#request.page.hasNextPage">
							  
								<a href="teacher/listStu.action?currentPage=${page.currentPage + 1 }&&date1=${date111 }&&date2=${date222 }">下一页</a> | 
								<a href="teacher/listStu.action?currentPage=${page.totalPage }&&date1=${date111 }&&date2=${date222 }">尾页</a>
								
							</s:if>
							<s:else>
							
							</s:else>
						</div>	
       </div>
  </body>
  
  <!-- ****************日期显示******************** -->
  <script>
  if("<s:property value="suc"/>"=="success"){
alert("删除成功！！！");
}else if("<s:property value="suc"/>"=="success2"){
 alert("内容修改成功！！！");
 }
  </script>
  
        <script type="text/javascript">

	    var d = new Date();
		var date = d.getFullYear();
		var uu=document.getElementById("menu4");
		var tt=document.getElementById("menu6");
		var aa=uu.getElementsByTagName("a");
		var bb=tt.getElementsByTagName("a");
		
		   for(var i=0; i<aa.length;i++) 
		   {
		   	aa[i].innerHTML=date;
		   	//aa[i].value=date;a
		   	aa[i].setAttribute('value', date);
		   	date--;
		   } 
		   var date = d.getFullYear();
		   for(var i=0; i<bb.length;i++) 
		   {
		   	bb[i].innerHTML=date;
		   	bb[i].setAttribute('value',date);
		   	date--;
		   	aa[i].value=date;
		   } 
		   
    
        </script>
        <script>
        function del()
        {
          alert("删除成功！");
        }
        </script>
</html>